-
Notifications
You must be signed in to change notification settings - Fork 30
Himanshuagnihotri #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Himanshuagnihotri #7
Conversation
Himanshuagnihotri.java
Outdated
import java.util.*; | ||
import java.util.regex.*; | ||
class Himanshu | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please put curly braces after the statement, for good practice.
For Ex : like this
class Himanshu {
}
not like this, it will take one extra line
class Himanshu
{
}
Himanshuagnihotri.java
Outdated
String text=sc.nextLine(); | ||
String a[]=new String[100]; | ||
n=Integer.parseInt(sc.nextLine()); | ||
for(i=0;i<n;i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use proper naming convention or meaningful variable names while declaring variables. And create a separate method to get the output.
Himanshuagnihotri.java
Outdated
a[i]=sc.nextLine(); | ||
} | ||
for(i=0;i<n;i++) | ||
{ for(int j=-1;(j=text.indexOf(a[i],j+1)) !=-1;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improper indentation.
No description provided.